// 后端将题型type改成枚举
// const TOPICMAP = {
//     SINGLE_CHOICE: 1, // 单选题
//     MULTIPLE_CHOICE: 2, // 多选题
//     DROPDOWM_CHOICE: 3, // 下拉题
//     CLOZE: 4, //问答题
//     IMAGE: 5, // 图片题
//     FILE: 6, // 文件题
//     PARAGRAPH: 7, // 段落说明
// }

import Checkbox from './Checkbox'
import Cloze from './Cloze'
import ImgUpload from './ImgUpload'
import Radio from './Radio'
import FileBox from './FileBox'

const TopicCompMap = new Map<number, any>([
    [1, Radio],
    [2, Checkbox],
    [4, Cloze],
    [5, ImgUpload],
    [6, FileBox],
])

export const getQuestionByType = (type: number) => {
    return TopicCompMap.get(type)
}
